//
//  WCTextView.h
//  WabbitCode
//
//  Created by William Towe on 1/21/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "WCAppController.h"


@class WCRulerView, WCTextFile, WCProject;

@interface WCTextView : NSTextView {
	NSString *_infoString;
	WCTextFile *_textFile;
	WCProject *_project;
	BOOL _wrapLines;
	BOOL _automaticallyIndentNewLines;
	BOOL _showGutter;
	BOOL _automaticallyInsertClosingParenthesis;
	
	BOOL _shouldHighlightWord;
	NSString *_wordToHighlight;
}

@property (readwrite, copy) NSString *infoString;
@property (readonly) WCRulerView *rulerView;
@property (readwrite, assign) WCTextFile *textFile;
@property (readwrite, assign) WCProject *project;
@property (readwrite, assign) BOOL wrapLines;
@property (readwrite, assign) BOOL automaticallyIndentNewLines;
@property (readwrite, assign) BOOL showGutter;
@property (readwrite, assign) BOOL showLineNumbers;
@property (readwrite, assign) BOOL showErrors;
@property (readwrite, assign) BOOL showWarnings;
@property (readwrite, assign) BOOL showInvisibleCharacters;
@property (readwrite, assign) BOOL automaticallyInsertClosingParenthesis;
@property (readwrite, assign) BOOL shouldHighlightWord;
@property (readwrite, copy) NSString *wordToHighlight;

- (IBAction)enableDisableBreakpointAtCurrentLineAction:(id)sender;
- (IBAction)addRemoveBreakpointAtCurrentLineAction:(id)sender;
- (IBAction)gotoLineAction:(id)sender;
- (IBAction)jumpToDefinitionAction:(id)sender;
- (IBAction)findSelectedTextInProjectAction:(id)sender;
- (IBAction)toUppercaseAction:(id)sender;
- (IBAction)toLowercaseAction:(id)sender;
- (IBAction)commentUncommentAction:(id)sender;
- (IBAction)blockCommentUncommentAction:(id)sender;
- (IBAction)shiftRightAction:(id)sender;

- (IBAction)toggleWrapLinesAction:(id)sender;
- (IBAction)toggleAutomaticallyIndentNewLinesAction:(id)sender;
- (IBAction)toggleAutomaticallyInsertClosingParenthesisAction:(id)sender;
- (IBAction)toggleShowGutterAction:(id)sender;
- (IBAction)toggleShowLineNumbersAction:(id)sender;
- (IBAction)toggleShowErrorsAction:(id)sender;
- (IBAction)toggleShowWarningsAction:(id)sender;
- (IBAction)toggleShowInvisibleCharactersAction:(id)sender;

- (id)initWithFrame:(NSRect)frame textFile:(WCTextFile *)textFile inProject:(WCProject *)project;

- (void)setTabWidth;
- (void)setupDefaults;
@end
